| API Documentation |  |

- MAIN PAGE
- NAMESPACES
- CLASSES

Public Member Functions | List of all members
nkWinUi::ToolBar::Item Class Referenceabstract

Represents an item within a ToolBar. More...

## Public Member Functions
| Item () noexcept
virtual | ~Item ()
virtual nkMemory::StringView | getLabel () const =0
virtual std::function< void()> | getCallback () const =0
virtual ContextMenu * | getContextMenu () const =0

## Detailed Description

Represents an item within a ToolBar.

## Constructor & Destructor Documentation

## ◆ Item()

nkWinUi::ToolBar::Item::Item | ( |  | ) |
| noexcept

Default constructor.

Remarks
  An Item is constructed through the call to ToolBar::addItem().

## ◆ ~Item()

virtual nkWinUi::ToolBar::Item::~Item | ( |  | ) |
| virtual

Destructor.

## Member Function Documentation

## ◆ getLabel()

virtual nkMemory::StringView nkWinUi::ToolBar::Item::getLabel | ( |  | ) | const
| pure virtual

Returns
  The label associated with the item.

## ◆ getCallback()

virtual std::function<void ()> nkWinUi::ToolBar::Item::getCallback | ( |  | ) | const
| pure virtual

Returns
  The callback on selection associated with the item.

Remarks
  A callback can be specified for an item to be used as a button within a tool bar. Note that if the linked context menu is fed with items, the callback will be invoked, before the context menu being displayed.

## ◆ getContextMenu()

virtual ContextMenu* nkWinUi::ToolBar::Item::getContextMenu | ( |  | ) | const
| pure virtual

Returns
  The context menu with the item.

Remarks
  The context menu is the menu that will be shown when an item is selected, if populated beforehand.

The documentation for this class was generated from the following file:

- Documentation/Headers/NilkinsWinUi/Components/ToolBar.h